package jpave.query_interface;

import javax.swing.JPanel;
import util.ui.MenuTreeNode;

// mdb added 4/10/08
public class Tab extends JPanel {
	private static final long serialVersionUID = 1744893675782003263L;

	private static final boolean DEBUG = false;
	
	private static int nNextID = 0;
	
	private int nID; // unique ID, used as name in CardLayout
	private String strTitle; // for debug
	private JPaveFrame parentFrame = null;
	private Tab parentTab = null; // tab that created this tab (but not necessarily the container getParent())
	private MenuTreeNode menuNode = null;
	
	public Tab(JPaveFrame parentFrame, Tab parentTab) {
		nID = ++nNextID;
		if (DEBUG) System.err.println("Tab: "+nID+" "+this);
		this.parentFrame = parentFrame;
		this.parentTab = parentTab;
	}
	
	public int getID() { return nID; }
	public JPaveFrame getParentFrame() { return parentFrame; }
	public Tab getParentTab() { return parentTab; }
	public String getTitle() { return strTitle; }
	public void setTitle(String strTitle) { this.strTitle = strTitle; }
	public MenuTreeNode getMenuNode() { return menuNode; }
	public void setMenuNode(MenuTreeNode newNode) { this.menuNode = newNode; }
	public void close() { } // implemented by subclass
}
